<html>
<head><meta charset="utf-8"><title>Benchmarking · t-cargo/PubGrub · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/index.html">t-cargo/PubGrub</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/Benchmarking.html">Benchmarking</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="212914876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/Benchmarking/near/212914876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Tokarev <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/Benchmarking.html#212914876">(Oct 10 2020 at 13:02)</a>:</h4>
<p>I found that adding this to Cargo.toml isn't needed (from <a href="https://github.com/mpizenberg/pubgrub-rs/issues/27">https://github.com/mpizenberg/pubgrub-rs/issues/27</a>):</p>
<div class="codehilite"><pre><span></span><code># in Cargo.toml
[profile.release]
debug = true

[profile.bench]
debug = true
</code></pre></div>


<p>Release profile isn't used when running <code>cargo bench</code>, and benchmarking profile must be already including debug symbols since I got a report from <code>perf</code> just fine.</p>



<a name="212918807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/Benchmarking/near/212918807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/Benchmarking.html#212918807">(Oct 10 2020 at 14:35)</a>:</h4>
<p>I did something in my .cargo/config to always have debug symbols. I keeped benchmarking things only to find that I had no useful info. So I no longer remember which require that incantation.<br>
BTW, what OS are you on? The advice in the writeup is very Linux sencrick. I think that list of tools can be made to work on mac as well, but you'll need a totally different list for windows.</p>



<a name="212919574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/Benchmarking/near/212919574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Tokarev <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/Benchmarking.html#212919574">(Oct 10 2020 at 14:56)</a>:</h4>
<p>I tried following the guide on Arch Linux without doing any changes to the default Rust setup. Works fine without modifying Cargo.toml for me.</p>



<a name="212978102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/Benchmarking/near/212978102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/Benchmarking.html#212978102">(Oct 11 2020 at 19:25)</a>:</h4>
<p>Yep the default profile already includes a few things but adding <code>debug = true</code> enable more info and more dynamic things with things like debuggers where you can add breakpoints for example. The release profile is not necessary for something generated from a benchmark but rather if we want to profile things in <code>examples/</code> for example. I don't remember which profile is using criterion.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>